import request from '@/config/axios'

// 获得会员活动分页
export const getActivityPage = async (params) => {
  return await request.get({ url: `/member/activity/page`, params })
}

// 获得会员活动列表
export const getActivityList = async (params) => {
  return await request.get({ url: `/member/activity/get`, params })
}

// 新增会员活动
export const createActivity = async (data) => {
  return await request.post({ url: `/member/activity/create`, data })
}

// 修改会员活动
export const updateActivity = async (data) => {
  return await request.put({ url: `/member/activity/update`, data })
}

// 删除会员活动
export const deleteActivity = async (id) => {
  return await request.delete({ url: `/member/activity/delete?id=` + id })
}

// 开启/关闭会员活动状态
export const updateActivityStatus = async (data) => {
  return await request.put({ url: `/member/activity/updateStatus`, data })
}
// 会员活动奖励记录
export const getActivityRewardPage = async (params) => {
  return await request.get({ url: `/member/activity-reward/page`, params })
}
